FROM openjdk:11
WORKDIR /usr/app
ADD ./target/*.jar app.jar
ENV JAVA_OPTS="\
-Xms2048m -Xmx2048m \
-XX:+UseContainerSupport \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=/data/logs"
#ENTRYPOINT ["java","-jar","app.jar"]
ENTRYPOINT java ${JAVA_OPTS}  -jar app.jar